import {
	request
} from "@/utils/request.js";
// 获取token
export const getToken = (data) => {
	return request({
		url: `auth/wx_applet/login`,
		method: "POST",
		data,
	});
};

// （用户已登录）扫码进入
export const scanCode = (data) => {
	return request({
		url: `auth/wx_applet/scanCodeTo`,
		method: "POST",
		data,
	});
};
// 切换租户更新token
export const tenantUpdateToken = (data) => {
	return request({
		url: `auth/wx_applet/switchTenant`,
		method: "POST",
		data,
	});
};
// 获取租户列表
export const tenantList = (data) => {
	return request({
		url: `web/applet/user/tenantList`,
		method: "GET",
		data,
	});
};
// 获取消息列表
export const messageList = (data) => {
	return request({
		url: `web/applet/msgCenter/getMsgListByMemberIdOrTenantId`,
		method: "GET",
		data,
	});
};
// 获取消息详情 根据消息id获取消息详情(可同时标记为已阅读)
export const messageDetail = (data) => {
	return request({
		url: `web/applet/msgCenter/getMsgDetailsById`,
		method: "GET",
		data,
	});
};
// 获取消息详情下的配置类型列表数据
export const messageDetailList = (data) => {
	return request({
		// url: `web/applet/msgCenter/getMsgDetailsById`,
		method: "GET",
		data,
	});
};
// 根据消息类型获取消息数量
export const messageQuantity = (data) => {
	return request({
		url: `web/applet/msgCenter/getImReceivedMsgNum`,
		method: "GET",
		data,
	});
};
// 根据消息id确认、同意、拒绝消息(拒绝消息需要传拒绝原因)
export const confirmedMessage = (data) => {
	return request({
		url: `web/applet/msgCenter/processMsgById`,
		method: "POST",
		data,
	});
};

// 获取项目进度
export const getProgressList = (data) => {
	return request({
		url: `web/applet/crmCustomerTask/getCustomerPlan`,
		method: "GET",
		data,
	});
};
// 联系方式
export const contactList = () => {
	return request({
		url: `web/applet/user/getTeam`,
		method: "GET",
	});
};


// 获取透明装配置
export const getConfig = (data) => {
	return request({
		url: `web/applet/open/mode/getConfig`,
		method: "GET",
		data,
	});
};